package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);
    /**
     * 查询满足条件的列表数据
     * @return 查询到的列表数据
     */
    List<Employee> selectAll(EmployeeQueryObject qo);

    int updateByPrimaryKey(Employee record);

    void insertRoleRelationBatch(@Param("eid") Long eid, @Param("roleIds") List<Long> roleIds);

    void deleteRoleRelationByEId(Long eid);

    void updateAdminState(@Param("id") Long id, @Param("admin") Boolean admin);

    Employee getByNameAndPassword(@Param("name") String name, @Param("password") String password);

    Employee selectByUsername(String username);
}